<?php 
	$calendarLanguageTMP = explode('_',Yii::app()->getLanguage());
	$calendarLanguage = $calendarLanguageTMP[0] . '-' . strtoupper($calendarLanguageTMP[1]);
	
	if($calendarLanguageTMP[0] == 'en')
	{
		$calendarLanguage = 'en-GB';
	}
	
	if($calendarLanguageTMP[0] == 'es')
	{
		$calendarLanguage = 'es';
	}

?>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'feriado-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note"><?php echo t('Los Campos con','nucleo_etiqueta') . ' <span class="required">*</span> ' . t('son requeridos','nucleo_etiqueta');?> </p>

	<?php echo $form->errorSummary($model); ?>
	
	<fieldset>
		<fieldset>
			<div class="width_half">
			<?php 
				echo $form->labelEx($model,'feriado_dia');
				$this->widget(
					'zii.widgets.jui.CJuiDatePicker',
					array(
						'model'=>$model,
						'attribute'=>'feriado_dia',
						
						'language' => $calendarLanguage,
						'options' => array(
											//'dateFormat'=>Yii::app()->locale->getDateFormat('calendar_short_format'),
											'dateFormat'=>'dd-mm-yy',
											'changeMonth' => 'true',
											'changeYear' => 'true',
											'constrainInput' => 'false',
											'duration'=>'fast',
											'showAnim' =>'slide',
											'yearRange' => '1900:' . date('Y'),
						),
						'htmlOptions'=>array()
					)
	);
				echo $form->error($model,'feriado_dia');
			?>
			</div>
			<div class="width_half">
			<?php 
				echo $form->labelEx($model,'feriado_descripcion');
				echo $form->textArea($model,'feriado_descripcion',array('rows'=>6, 'cols'=>50));
				echo $form->error($model,'feriado_descripcion');
			?>
			</div>
		</fieldset>
		<fieldset>
			<div class="row buttons">
				<?php echo CHtml::submitButton(t($model->isNewRecord ? 'Crear' : 'Guardar','nucleo_etiqueta'),array('class'=>'submit')); ?>
			</div>
		</fieldset>
	</fieldset>

	

<?php $this->endWidget(); ?>

</div><!-- form -->